<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<base href='{echo:$siteDomain;/}' />
<link rel="stylesheet" type="text/css" href="skin/default/jooyea/css/iframe.css" />
<script language=JavaScript src="skin/default/js/jooyea.js"></script>
<SCRIPT language=JavaScript src="servtools/ajax_client/ajax.js"></SCRIPT>
<script type='text/javascript'>

	function set_state_view(set_ol_hidden){
		var ol_state_ico=$("ol_ioc_gif");
		var ol_state_label=$("ol_label_txt");
		var ol_state_reset=$("set_state");
		if(set_ol_hidden==1){
			ol_state_ico.src='skin/default/jooyea/images/hiddenline.gif';
			ol_state_label.innerHTML='{echo:lp{u_hidden};/}';
			ol_state_reset.innerHTML='<a href="javascript:set_ol_state(0);">{echo:lp{u_set_onl};/}</a>';
		}else if(set_ol_hidden==0){
			ol_state_ico.src='skin/default/jooyea/images/online.gif';
			ol_state_label.innerHTML='{echo:lp{u_onl};/}';
			ol_state_reset.innerHTML='<a href="javascript:set_ol_state(1);">{echo:lp{u_set_hidden};/}</a>';
		}
	}
	function set_ol_state(set_ol_hidden){
		var ol_state=new Ajax();//实例化Ajax
		ol_state.getInfo("do.php","GET","app","act=user_ol_reset&is_hidden="+set_ol_hidden,function(c){set_state_view(set_ol_hidden);});
	}

	function submit_new_mood(){
		var last_mood_div=$("the_last_mood");
		var mood_text=trim($("mood_txt").value);
		if(mood_text==''){
			parent.Dialog.alert("{echo:lp{mo_add_err};/}");
		}else{
			last_mood_div.innerHTML='{echo:lp{u_data_post};/}';
			var postStr="mood="+$("mood_txt").value;
			var new_mood=new Ajax();//实例化Ajax
			new_mood.getInfo("do.php?act=mood_add&ajax=1","post","app","mood="+$("mood_txt").value,function(c){last_mood_div.innerHTML=c;$("mood_txt").value="";});
		}
	}

//新鲜事
function list_recent_affair(h_id,ra_type,is_more){
	hidden_obj('none_data');show_obj('affair_info');
	var recent_affair_div=$("sec_Content");
	if(is_more!=1){//重新切换类别新鲜事则清空预设值
		$('affair_start_num').value=0;
		recent_affair_div.innerHTML="<div class=\"loading\"><span class='right'>{echo:lp{ah_loading_data};/}</span><img src='skin/default/jooyea/images/loading.gif'></div>";
	}else{
		$('affair_start_num').value=parseInt($('affair_start_num').value)+{echo:$mainAffairNum;/};
	}
	if(ra_type=='' && ra_type!==0)	ra_type=$('affair_type').value;
		else	$('affair_type').value=ra_type;
	var start_num=parseInt($('affair_start_num').value);
	var list_affair=new Ajax();//实例化Ajax
	list_affair.getInfo("modules.php","get","app","app=recent_affair&t="+ra_type+"&start_num="+start_num,function(c){
		hidden_obj('none_data');show_obj('affair_info');
		if(is_more==1){
			recent_affair_div.innerHTML=recent_affair_div.innerHTML+c;
		}else{
			recent_affair_div.innerHTML=c;
		}
		if(c==''){show_obj('none_data');hidden_obj('affair_info');}else{pick_script(c);}
	});
}

function clear_remind(remind_id){
	if(parseInt($("remind_count").innerHTML)==1){
		$("remind_main").style.display='none';
	}
	$("remind_count").innerHTML=parseInt($("remind_count").innerHTML)-1;
	var ajax_remind=new Ajax();
	ajax_remind.getInfo("do.php","GET","app","act=message_del&id="+remind_id,function(c){$("remind_list").innerHTML=c;});
}

function changeStyle(obj){
	var tagList = obj.parentNode;
	var tagOptions = tagList.getElementsByTagName("li");
	for(i=0;i<tagOptions.length;i++){
		if(tagOptions[i].className.indexOf('active')>=0){
			tagOptions[i].className = '';
		}
	}
	obj.className = 'active';
}
parent.showDiv();
</script>
</head>
<body id="main_iframe">
<input type='hidden' id='affair_type' value=0 />
<input type='hidden' id='affair_start_num' value=0 />
<div class="mypanel">
    <div class="myphoto"><img src="{echo:get_sess_userico();/}" /></div>
    <div class="sendbox">
    <div class="myinfo">
        <span class="left">
            <a class="strong" href="{echo:get_uhome_url(get_sess_userid());/}" target="_blank">{echo:filt_word(get_sess_username());/}</a>
            <span id='on_line_state' class="mystatus" onmouseover='show_obj("set_state");' onmouseout='hidden_obj("set_state");'>
                <img id="ol_ioc_gif" src='skin/default/jooyea/images/online.gif'>
                <span id='ol_label_txt' style='color:#838383'></span>
                <span id='set_state' class='mystatus' onmouseover='show_obj("set_state");' onmouseout='hidden_obj("set_state");' style="display:none;"></span>
            </span>
        </span>
        <span class="stats"> {echo:str_replace(array("{visitor_num}","{integral}","{uid}"),array($user_info['guest_num'],$user_info['integral'],$user_id),lp{u_ustate});/}
            <span title="{echo:count_level($user_info['integral']);/}">{echo:grade($user_info['integral']);/}</span>
        </span>
    </div>
      <textarea type="text" name="mood_txt" maxlength="140" onkeyup="return isMaxLen(this)" onclick="showFace(this,'face_list_menu','mood_txt');" onblur="show('face_list_menu',200)" id="mood_txt" ></textarea>
      <input type="submit" name="button" id="button" value="" onclick="submit_new_mood();" />
      <span id="the_last_mood" class="newmood">{echo:filt_word($last_mood_txt);/}</span>
    </div>

</div>
<!--空间提醒!-->
{sta:if($remind_rs)[exc]}
<div class="remind_box" id="remind_main">
	<div class="remind_title">
		<a href="modules.php?app=remind_message" class="more">{echo:lp{rf_more};/}</a>
		{echo:lp{rf_space};/}(<span id='remind_count'>{echo:$remind_count[0];/}</span>)
	</div>
	<ul class="remind_list" id="remind_list">
		{sta:foreach($remind_rs as $rs)[loop]}
			<li id='remind_{echo:$rs['id'];/}'>
				<div class="photo"><a href="home.php?h={echo:$rs['from_uid'];/}" target="_blank"><img src="{echo:$rs['from_uico'];/}" width="20px" height="20px" alt="" target="_blank" /></a></div>
				<div class="remind_content">
					<a href="home.php?h={echo:$rs['from_uid'];/}" target="_blank">{echo:$rs['from_uname'];/}</a>
					{echo:str_replace(array("{link}","{js}"),array($rs['link'],"clear_remind(".$rs['id'].")"),filt_word($rs['content']));/}
					{echo:$rs['count']>=2 ? "(".$rs['count'].lp{ah_times}.")":'';/}
				</div>
				<div class="remind_del"><a href="javascript:clear_remind({echo:$rs['id'];/})"></a></div>
			</li>
		{end:foreach/}
	</ul>
</div>
<div class="clear"></div>
{end:if/}

<!--空间提醒!-->
<div class="tabs" style="padding-left:87px;">
    <ul class="menu">
        <li onclick="list_recent_affair({echo:$user_id;/},0);changeStyle(this);" class="active"><a href="javascript:;" hidefocus="true">{echo:lp{rf_affair};/}</a></li>
        <li onclick="list_recent_affair({echo:$user_id;/},1);changeStyle(this);"><a href="javascript:;" hidefocus="true">{echo:lp{rf_state};/}</a></li>
        <li onclick="list_recent_affair({echo:$user_id;/},2);changeStyle(this);"><a href="javascript:;" hidefocus="true">{echo:lp{rf_album};/}</a></li>
        <li onclick="list_recent_affair({echo:$user_id;/},3);changeStyle(this);"><a href="javascript:;" hidefocus="true">{echo:lp{rf_blog};/}</a></li>
        <li onclick="list_recent_affair({echo:$user_id;/},4);changeStyle(this);"><a href="javascript:;" hidefocus="true">{echo:lp{rf_share};/}</a></li>
    </ul>
</div>
<div class="feedcontainer">
	<ul id="sec_Content"></ul>
	<div id='none_data' style="display:none;" class="gray mt20">{echo:lp{rf_none};/}</div>
	<div title="{echo:lp{ah_see_more_novelty};/}" id="affair_info" onclick="list_recent_affair({echo:$user_id;/},'',1);" class="more" ></div>
</div>
<div class="set_fresh_news"><a class="highlight" href="modules.php?app=user_affair">{echo:lp{rf_new_set};/}</a></div>
<div id="append_parent"></div>
<div style="display: none;" class="emBg" id="face_list_menu"></div>
<script type='text/javascript'>
	set_state_view({echo:get_sess_online();/});
	list_recent_affair(0,'');
</script>
</body>
</html>
